home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-01 / flilib.zip / FLISRC.ZIP / BCONTRAS.ASM < prev    next >
Assembly Source File  |  1989-12-18  |  492b  |  36 lines

  1. ;bcontras.asm - contains i86_bcontrast()
  2.  
  3. _TEXT    SEGMENT  BYTE PUBLIC 'CODE'
  4.  
  5.     ASSUME  CS: _TEXT 
  6.  
  7.  
  8.     PUBLIC _i86_bcontrast
  9.     ;i86_bcontrast(s1, s2, count)
  10. ;return how many bytes of s1 and s2 are different
  11. _i86_bcontrast PROC far
  12.     push bp
  13.     mov bp,sp
  14.     push ds
  15.     push si
  16.     push di
  17.     cld
  18.  
  19.     lds si,[bp+4+2]
  20.     les di,[bp+8+2]
  21.     mov cx,[bp+12+2]
  22.     repne cmpsb
  23.     inc cx
  24.     mov ax,[bp+12+2]
  25.     sub ax,cx
  26.  
  27.     pop di
  28.     pop si
  29.     pop ds
  30.     pop    bp
  31.     ret    
  32. _i86_bcontrast ENDP
  33.  
  34. _TEXT    ENDS
  35. END
  36.